package com.ihr360.insurance.model.dto.staff.embeddable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ihr360.commons.model.type.BenefitsPayer;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.util.Date;

/**
 * @author Stone.Shi
 * @description 社保/公积金数据实体
 * @date 2018-02-01 16:19:44.
 */
@Embeddable
public class BenefitEntity {

    /**
     * 代理服务商
     */
    private Long vendorId;
    /**
     * 缴纳组织
     */
    private Long payDepartmentId;
    /**
     * 实际承担方
     */
    @Enumerated(EnumType.STRING)
    private BenefitsPayer actualPayer;

    /**
     * 是否计算
     */
    @Column(columnDefinition = "bool default true")
    private Boolean calculatable = true;

    /**
     * 申报基数
     */
    private Integer base;

    /**
     * 起始月份
     */
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private Date startOn;

    /**
     * 停缴月份
     */
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private Date endOn;

    /**
     * 缴纳地
     */
    @Column(name = "division_id")
    private Long divisionId;

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public Long getPayDepartmentId() {
        return payDepartmentId;
    }

    public void setPayDepartmentId(Long payDepartmentId) {
        this.payDepartmentId = payDepartmentId;
    }

    public BenefitsPayer getActualPayer() {
        return actualPayer;
    }

    public void setActualPayer(BenefitsPayer actualPayer) {
        this.actualPayer = actualPayer;
    }

    public Boolean getCalculatable() {
        return calculatable;
    }

    public void setCalculatable(Boolean calculatable) {
        this.calculatable = calculatable;
    }

    public Integer getBase() {
        return base;
    }

    public void setBase(Integer base) {
        this.base = base;
    }

    public Date getStartOn() {
        return startOn;
    }

    public void setStartOn(Date startOn) {
        this.startOn = startOn;
    }

    public Date getEndOn() {
        return endOn;
    }

    public void setEndOn(Date endOn) {
        this.endOn = endOn;
    }

    public Long getDivisionId() {
        return divisionId;
    }

    public void setDivisionId(Long divisionId) {
        this.divisionId = divisionId;
    }
}
